package com.hotacorp.opencloud.common.log.annotation;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.context.annotation.Import;

import com.hotacorp.opencloud.common.log.feign.LogServiceProperties;
import com.hotacorp.opencloud.common.log.selector.LogImportSelector;

/**
 * @Description:允许写入日志注解，允许后，应该在配置文件中定义写入日志的服务名（log.servicename）等信息。
 * @version 0.5
 * @since JDK1.8
 * @author lwg
 * @copyright (c) 2020. All rights reserved.
 * @date 2020年1月16日 下午3:44:10
 */
@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Import({LogImportSelector.class,FeignClientsConfiguration.class})
@EnableFeignClients(basePackages= {"com.hotacorp.opencloud.common.log.feign"})
@EnableConfigurationProperties(LogServiceProperties.class)
public @interface EnableLogging {

}
